<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/purchaseinfo/purchase_payment/q_purchase_payment.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/purchaseinfo/purchase_payment/q_purchase_payment.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Purchase_payment',
                footer: "Foots",
                cnName: '采购付款单',
                name: 'purchase_payment/q_purchase_payment',
                url: "/q_purchase_payment/",
                sortName: "CreateDate"
            });
            const editFormFields = ref({"Voucher_sub":"","Paid_price":"","WHSE_no":"","Payment_status":"","Remark":""});
            const editFormOptions = ref([[{"title":"单据编码","field":"Voucher_sub","type":"text"},
                               {"title":"实付金额","field":"Paid_price","type":"text"},
                               {"dataKey":"一级仓库","data":[],"title":"采购机构","field":"WHSE_no","type":"select"},
                               {"dataKey":"付款状态","data":[],"title":"付款状态","field":"Payment_status","type":"select"}],
                              [{"title":"备注","field":"Remark","colSize":12,"type":"textarea"}]]);
            const searchFormFields = ref({"Voucher_sub":"","WHSE_no":"","AuditStatus":"","CreateDate":""});
            const searchFormOptions = ref([[{"title":"单据编码","field":"Voucher_sub","type":"like"},{"dataKey":"一级仓库","data":[],"title":"采购机构","field":"WHSE_no","type":"select"},{"dataKey":"audit","data":[],"title":"审核状态","field":"AuditStatus","type":"select"},{"title":"创建时间","field":"CreateDate","type":"datetime"}]]);
            const columns = ref([{field:'Voucher_sub',title:'单据编码',type:'string',link:true,width:120,align:'left',sort:true},
                       {field:'Goods_num',title:'数量',type:'float',width:80,hidden:true,align:'left'},
                       {field:'Total_price',title:'总价',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'Paid_price',title:'实付金额',type:'decimal',width:110,align:'left'},
                       {field:'WHSE_no',title:'采购机构',type:'string',bind:{ key:'一级仓库',data:[]},width:110,align:'left'},
                       {field:'Payment_status',title:'付款状态',type:'string',bind:{ key:'付款状态',data:[]},width:110,align:'left'},
                       {field:'AuditStatus',title:'审核状态',type:'int',bind:{ key:'audit',data:[]},width:110,align:'left'},
                       {field:'AuditDate',title:'审核时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'Remark',title:'备注',type:'string',width:220,align:'left'},
                       {field:'AuditID',title:'审核人员id',type:'int',width:110,hidden:true,align:'left'},
                       {field:'Auditor',title:'审核人员',type:'string',width:120,hidden:true,align:'left'},
                       {field:'CreateID',title:'创建人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人员',type:'string',width:100,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人员',type:'string',width:100,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'Purchase_payment',title:'ID',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'Payment_user',title:'付款人',type:'string',width:110,align:'left'},
                       {field:'Payment_date',title:'付款时间',type:'datetime',width:150,align:'left',sort:true}]);
            const detail = ref({
                cnName: "采购付款单明细",
                table: "q_purchase_paymentList",
                columns: [{field:'Purchase_paymentList',title:'ID',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'Purchase_payment',title:'父级ID',type:'guid',width:110,hidden:true,align:'left'},
                       {field:'Voucher_sub',title:'单据编码',type:'string',width:110,align:'left',sort:true},
                       {field:'Unpaidamount',title:'未付款金额',type:'decimal',width:110,align:'left'},
                       {field:'adjust',title:'调整金额',type:'decimal',width:110,edit:{type:'number'},align:'left'},
                       {field:'adjustRemark',title:'调整原因',type:'string',width:220,edit:{type:''},align:'left'},
                       {field:'Goods_num',title:'数量',type:'float',width:80,hidden:true,align:'left'},
                       {field:'Total_price',title:'总价',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'Paid_price',title:'实付金额',type:'decimal',width:110,edit:{type:'decimal'},require:true,align:'left'},
                       {field:'Supplier',title:'供货商',type:'int',bind:{ key:'供应商客户',data:[]},width:80,align:'left'},
                       {field:'PaymentType',title:'付款方式',type:'int',bind:{ key:'结账类型',data:[]},width:110,edit:{type:'select'},align:'left'},
                       {field:'AuditDate',title:'审核时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'Remark',title:'备注',type:'string',width:220,edit:{type:''},align:'left'},
                       {field:'AuditStatus',title:'审核状态',type:'int',width:110,hidden:true,align:'left'},
                       {field:'AuditID',title:'审核人员id',type:'int',width:110,hidden:true,align:'left'},
                       {field:'Auditor',title:'审核人员',type:'string',width:120,hidden:true,align:'left'},
                       {field:'CreateID',title:'创建人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人员',type:'string',width:100,hidden:true,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人员',type:'string',width:100,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,hidden:true,align:'left',sort:true}],
                sortName: "Goods_sub",
                key: "Purchase_paymentList"
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
